<%--
    Document   : sasie
    Created on : 1 févr. 2009, 23:14:03
    Author     : admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.*"%>
<%@page import="AGMap.*"%>
<%@ page errorPage="erreur.jsp" import="java.sql.*"%>






<html>
    <script src="soumettre.js" type="text/javascript"></script>
    <script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA"
            type="text/javascript"></script>

    <title>Enregistrement d'un commerce</title>

    <body id="body" onload="initialize()" onunload="GUnload()">
        <link href="Style.css" rel="stylesheet" type="text/css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <div id="barre_tache">

            <div id="langue"><a href="#"><img src="images/fr.gif"></a>&nbsp;&nbsp;<a href="#"><img src="images/uk.gif"></a></div>
        </div>

        <div id="separation"></div>

        <div id="information">
            <div id="titre" align="middle">Marques et enseignes</div>
            <form name="formulaire" method="POST" action="#" onsubmit="verif_formulaire()">
                <input type="hidden" name="save" value="savecom">
                <table>
                    <tr>
                        <th>Nom : </th><td><input type="text" size="25" name="nom" id="nom"></td>
                    </tr>
                    <tr>
                        <th>Adresse : </th><td><input type="text" size="40" name="adr" id="adr" onclick="montrerAdresse(document.formulaire.adr.value)"></td>
                    </tr>
                    <tr>
                        <th>Latitude : </th><td><input type="text" size="15" name="lat" id="lat"></td>
                    </tr>
                    <tr>
                        <th>Longitude : </th><td><input type="text" size="15" name="lng" id="lng"></td>
                    </tr>
                </table>
                <BR><input type="submit" value="Soumettre">
            </form>

        </div>

        <div id="carte"></div>

        <div id="reponse">
        <% Enumeration champs = request.getParameterNames();
        if (champs.hasMoreElements())
        {
            String nom = request.getParameter("nom");
            String adresse = request.getParameter("adr");
            String lat = request.getParameter("lat");
            String lng = request.getParameter("lng");

            Position p=new Position(Float.parseFloat(lat),Float.parseFloat(lng));
            //Commerces com=new Commerces(nom,adresse,Float.parseFloat(lat),Float.parseFloat(lng),"modifiable");
            Commerce com=new Commerce(nom,adresse,p);
            com.ajouterCommerce(com);
        }
        %>
        Insertion réussie de <%=request.getParameter("nom")%>
        </div>

        <div id="piedpage">
            <div id="contact"><a href="mailto:Yves.Wolff@free.fr;fsoutarson@hotmail.fr">Contact</a></div>
        </div>

    </body>
</html>

